package day01;

/**
 * @author feng
 * @Date 2021/7/22 7:51
 */
public class TestThread10 extends Thread {
    public TestThread10() {
        System.out.println("构造方法的执行" + Thread.currentThread().getName());       //mian
        System.out.println("构造方法的执行" + this.getName());
    }

    @Override
    public void run() {
        System.out.println("run的执行" + Thread.currentThread().getName());
        System.out.println("run的执行" + this.getName());
    }
}

class Test03 {
    public static void main(String[] args) throws InterruptedException {
        TestThread10 thread10 = new TestThread10();
        thread10.setName("t10");
        thread10.start();
        //mian线程
        Thread.sleep(500);

        Thread t3 = new Thread(thread10, "t3");
        t3.start();
        boolean flag = t3.isAlive();
        System.out.println(flag);
        System.out.println(t3.getId());



    }
}